package com.example.flower_shop.vo.menu;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

@Data
@Schema(description = "菜单请求对象")
public class MenuReqVO {
    @Schema(description = "菜单ID", example = "1")
    private Long id;

    @Schema(description = "父菜单ID", example = "0")
    private Long parentId;

    @NotBlank(message = "菜单名称不能为空")
    @Schema(description = "菜单名称", example = "主菜单")
    private String name;

    @NotBlank(message = "组件地址不能为空")
    @Schema(description = "菜单地址", example = "/main")
    private String component;

    @NotBlank(message = "权限标识不能为空")
    @Schema(description = "权限标识", example = "menu.view")
    private String perm;

    @NotNull(message = "菜单类型不能为空")
    @Schema(description = "类型 (0: 目录, 1: 菜单, 2: 按钮)", example = "1")
    private Integer type;

    @Schema(description = "图标", example = "icon-home")
    private String icon;

    @Schema(description = "排序", example = "1")
    private Integer sort;

    @NotBlank(message = "路由地址不能为空")
    @Schema(description = "视图地址", example = "/home")
    private String path;

    @Schema(description = "重定向地址", example = "/redirect")
    private String redirect;

    @Schema(description = "路由缓存", example = "true")
    private Boolean noCache;

    @Schema(description = "是否显示", example = "true")
    private Boolean alwaysShow;

    @Schema(description = "隐藏", example = "false")
    private Boolean hidden;
}
